package com.currency.pojo;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.math.BigDecimal;
import java.util.Date;

@Data
@TableName(value = "wyt_coins_trade_resume")
public class WytCoinsTradeResumePojo {
    //关联货源扣减
    public static Integer MUL = 0;

    //关联运单增加
    public static Integer ADD = 1;

    // 关联充值增加
    public static Integer ADD_RECHARGE = 2;

    // 关联提现扣减
    public static Integer MUL_WITHDRAWAL = 3;

    @ApiModelProperty(value = "交易扼要id")
    @TableId(value = "id")
    private String id;

    @ApiModelProperty(value = "用户id")
    @TableField(value = "user_id")
    private String userId;

    @ApiModelProperty(value = "交易金额")
    @TableField(value = "amount")
    private BigDecimal amount;

    @ApiModelProperty(value = "金币交易类型  0-发布货物扣减  1-运输完成增加  2-充值增加  3-提现减少金币")
    @TableField(value = "type")
    private Integer type;

    @ApiModelProperty(value = "关联的交易id")
    @TableField(value = "out_id")
    private String outId;

    @ApiModelProperty(value = "交易描述")
    @TableField(value = "msg")
    private String msg;

    @ApiModelProperty(value = "创建时间")
    @TableField(value = "create_datetime")

    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createDatetime;

    @ApiModelProperty(value = "更新时间")
    @TableField(value = "update_datetime")
    @DateTimeFormat(pattern = "yyyy-MM-ddHH:mm:ss")
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    private Date updateDatetime;

}
